<!DOCTYPE html>
<html>
<head>
    <title>代码生成</title>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/font-awesome.min.css">
    <link rel="stylesheet" href="plugins/jqgrid/ui.jqgrid-bootstrap.css">
    <link rel="stylesheet" href="plugins/ztree/css/metroStyle/metroStyle.css">
    <link rel="stylesheet" href="css/main.css">
    <script src="libs/jquery.min.js"></script>
    <script src="plugins/layer/layer.js"></script>
    <script src="libs/bootstrap.min.js"></script>
    <script src="libs/vue.min.js"></script>
    <script src="plugins/jqgrid/grid.locale-cn.js"></script>
    <script src="plugins/jqgrid/jquery.jqGrid.min.js"></script>
    <script src="plugins/ztree/jquery.ztree.all.min.js"></script>
    <script src="js/common.js"></script>
</head>
<body>
<div id="rrapp" v-cloak>
    <div class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
            <div class="form-group">
                <div class="col-sm-2 control-label">数据库地址</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="code.host" placeholder="数据库地址"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">数据库端口</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="code.port" placeholder="数据库端口"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">数据库</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="code.dataBase" placeholder="数据库"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">数据库账号</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="code.account" placeholder="数据库账号"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">数据库密码</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="code.password" placeholder="数据库密码"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">基础包</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="code.basePackage" placeholder="基础包如com.yeejoin.amos"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">表前缀</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="code.tablePrefix" placeholder="表前缀如spc_"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">表名</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="code.tableNames" placeholder="表名（多个可用逗号分开）"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="gencode" value="生成"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reset" value="重置"/>
            </div>
        </form>
    </div>
</div>

<script src="js/gencode.js"></script>
</body>
</html>